/***********************************************************
 * Author: 	Brandon McKune
 * E-Mail:	bmckune.cs@gmail.com
 * Date:	September 2, 2011
 * Class:	Advanced OS
 * Time:	1150 - 1325
 * Smstr:	Fall 2011
 */

#include "Utilities.h"

/**
 * 	CleanUpVector Function:
 * 	Description:
 * 		This function was needed by several objects used in
 * 		this scheduling program.  Made global for any vector
 * 		that matches the current signature.
 * 	Parameters:
 * 		vector<ClTask*> *ptrToVec
 * 			Pointer to vector containing ClTask objects that
 * 			needs to be freed up from memory.
 * 	Return:
 * 		void
 */
void CleanUpVector(vector<ClTask> *vec){
	vector<ClTask>::iterator iter;
	iter = vec->begin();
	vec->clear();
	delete(vec);
}

/**
 * 	PrintVector Function:
 * 	Description:
 * 		This function was needed by several objects used in
 * 		this scheduling program.  Made global for any vector
 * 		that matches the current signature.
 * 	Parameters:
 * 		vector<ClTask*> *ptrToVec
 * 			Pointer to vector containing ClTask objects that
 * 			needs to be printed.
 * 	Return:
 * 		void
 */
void PrintVector(vector<ClTask> *vec){
	vector<ClTask>::iterator iter;
	iter = vec->begin();

	while(iter != vec->end()){
		iter->printTaskInternals();
		iter++;
	}
}
